package cn.wk.client;

import cn.wk.AjaxResult;
import cn.wk.domain.Movie;
import cn.wk.dto.MovieDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "movie-server",fallbackFactory = MovieFeignFallback.class)
public interface MovieFeign {
    /**
     * 购票服务提供电影票购买接口，用户可以通过该接口购买电影票，同时保存购票记录
     */
    @PostMapping("/movie/buy")
    AjaxResult goBuy(@RequestBody Movie movie);

    /**
     * 更新票数
     * @param movieDto
     */
    @PostMapping("/movie/updateTicked")
    void updateTicked(@RequestBody MovieDto movieDto);
}
